package com.xyq.system.domain.question.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class QuestionVO {
//加上注解,让 questionId 发给前端时转成字符串, 这样前端才能接收
    @JsonSerialize(using = ToStringSerializer.class)
    private Long questionId ;
    private String title ;
    private Integer difficulty ;
    private String createName ;
    // 转换日期格式
    @JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss")
    private LocalDateTime createTime ;
}
